﻿Imports System.Windows.Forms

Public Class frmDateRange
    Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click
        If DateTimeEnd.Value < DateTimeStart.Value Then
            MessageBox.Show("结束时间小于开始时间，请重新检查您输入的数据!")
            Me.Activate()
        Else
            Me.DialogResult = System.Windows.Forms.DialogResult.OK
            Me.Close()
        End If
    End Sub

    Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel_Button.Click
        Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
        Me.Close()
    End Sub

    Private Sub DateRange_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Leave
        If DateTimeEnd.Value < DateTimeStart.Value Then
            MessageBox.Show("结束时间小于开始时间，请重新检查您输入的数据!")
            Me.Activate()
        End If
    End Sub



    Private Sub DateTimeEnd_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateTimeEnd.ValueChanged

    End Sub
End Class
